<div class="xsy_opportunity_progress {{if failureFlg == 1}}xsy_opportunity_progress_disabled{{/if}}">
    {{if failureFlg == 1}}
    <div class="xsy_opportunity_progress_result">
        <span>{{ 'OPPORTUNITY_LOSE_4' | i18n }}</span> <span>{{ 'OPPORTUNITY_PLEASE_LOSE_REASON' | i18n }}{{failureReason}}</span>
    </div>
    {{/if}}
    <div class="xsy_opportunity_progress_header">
        <div class="xsy_opportunity_progress_border">
            <div class="xsy_opportunity_progress_wrapper">
                <div class="xsy_opportunity_progress_stretch">
                    <ul class="xsy_opportunity_progress_nav">
                        {{each stages as stage i}}
                        <li title="{{stage.stageName}}" stageId="{{stage.id}}" stageStatus="{{stage.stageStatus}}" status="{{stage.status}}" class="js-complex-progress xsy_opportunity_progress_item xsy_opportunity_progress_tab
                                {{if i < currentIndex}}
                                    xsy_opportunity_progress_tab_actived">
                            <a class="xsy_opportunity_progress_header">
                                <span class="xsy_opportunity_progress_header_warp">
                                    <b class="xsy_opportunity_progress_check"></b>
                                    <span>{{stage.stageName}}</span>
                                </span>
                            </a>
                            {{/if}}
                            {{if i == currentIndex}}
                            xsy_opportunity_progress_tab_current">
                            <a class="xsy_opportunity_progress_header">
                                <span class="xsy_opportunity_progress_header_warp">
                                    <b class="xsy_opportunity_progress_check"></b>
                                    <span>{{stage.stageName}}  {{stage.currentPercent}}%</span>
                                </span>
                            </a>
                            {{/if}}
                            {{if i > currentIndex}}
                            ">
                            <a class="xsy_opportunity_progress_header">
                                <span class="xsy_opportunity_progress_header_warp">
                                    <b class="xsy_opportunity_progress_check"></b>
                                    <span>{{stage.stageName}}</span>
                                </span>
                            </a>
                            {{/if}}
                        </li>
                        {{/each}}
                    </ul>
                </div>
            </div>
        </div>
        <div class="xsy_opportunity_progress_action">
            {{if failureFlg}}
            <a status="2" href="javascript:;" class="js-complex-progress action-btn">{{ 'OPPORTUNITY_RESTART' | i18n }}</a>
            {{/if}}
            {{if !failureFlg}}
            <a status="3" href="javascript:;" class="js-complex-progress action-btn">{{ 'OPPORTUNITY_LOSE' | i18n }}</a>
            {{/if}}
        </div>
    </div>

    <div class="xsy_opportunity_progress_body">
        <span class="xsy_opportunity_progress_title">
            任务目标
        </span>

        {{each stages as stage i}}
        <div stageId="{{stage.id}}" class="xsy_opportunity_progress_card" {{if currentStage.id != stage.id}}style="display: none"{{/if}}>
        <ul class="xsy_opportunity_progress_list">
            {{each stage.activities as activity}}
            <li activityId="{{activity.id}}" class="xsy_opportunity_progress_carditem">
                <div class="xsy_opportunity_progress_carditem_wrap">
                    <div class="xsy_opportunity_progress_flow">
                        <div class="ellipsis">
                            <a hasChecked="{{activity.checked}}" percent="{{activity.percent}}" href="javascript:;" class="xsy_opportunity_progress_flow_ico"></a>
                            <span class="xsy_opportunity_progress_task_name">{{activity.activityName}}</span>
                        </div>
                        <div class="">
                            <span>（{{activity.percent}}%）</span>
                        </div>
                    </div>
                    {{if activity.keyFlag == 1}}
                    <div class="xsy_opportunity_progress_doc">
                        {{if activity.fileId != '' && activity.fileName != ''}}
                        <a href="/download-ocf.action?ocfId={{activity.fileId}}" title="{{activity.fileName}}"
                           class="xsy_opportunity_progress_ico ellipsis {{activity.fileType}}">{{activity.fileName}}</a>
                        <a href="javascript:;" activityId="{{activity.id}}" class="xsy_opportunity_progress_replace rfloat js-progress-file-upload">替换</a>
                        {{/if}}
                        {{if activity.fileId == '' && activity.fileName == ''}}
                        <a href="javascript:;" activityId="{{activity.id}}" class="xsy_opportunity_progress_ico_null ellipsis js-progress-file-upload">上传文档</a>
                        {{/if}}
                    </div>
                    {{/if}}
                </div>
            </li>
            {{/each}}
        </ul>
    </div>
    {{/each}}
</div>

<div class="xsy_opportunity_progress_footer">
    <a href="javascript:" jsFooterA="1" class="xsy_opportunity_progress_fewerico">收起区域</a>
    <a href="javascript:" jsFooterA="2" class="xsy_opportunity_progress_spreadico" style="display: none">展开区域</a>
</div>
</div>